﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VipSys.Business;
using VipSys.DataLayer;
using VipSys.SystemEntity;
using VipSys.Common;

namespace VipSys.website
{
    public partial class RoomieInfo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.InitRoomieInfo();
            }
        }

        private void InitRoomieInfo()
        {
            string szID = Request["ID"].ToString();
            if (string.IsNullOrEmpty(szID))
                return;
            User user=new User();
            short shRet = UserAccess.Instance.GetUser(szID, ref user);
            if (shRet != SystemData.ReturnValue.OK)
                return;
            this.txtName.Text = user.Name;
            this.txtBaks.Text = user.Bak;
            this.txtExamSchool.Text = user.ExamSchool;
            this.txtSchool.Text = user.School;
            this.txtGender.Text = user.Gender;
            this.txtHotel.Text = user.Hotel;
            this.txtRoom.Text = user.Room;
            this.txtMoneyBack.Text = user.MoneyBack;
            this.txtExamPlace.Text = user.ExamPlace;
            this.txtHotelExpense.Text = user.HotelExpense;
        }

        protected void btnBack_Click(object sender, EventArgs e)
        {
            Response.Redirect("UserInfo.aspx");
        }
    }
}